<style>
    .profile-avatar-container {
        position:relative;
        width:100px;margin:0 auto;
    }
    .profile-avatar-container .profile-user-img{
        width:100px;
        height:100px;
    }
    .profile-avatar-container .profile-avatar-text {
        display:none;
    }
    .profile-avatar-container:hover .profile-avatar-text {
        display:block;
        position:absolute;
        height:100px;
        width:100px;
        background:#444;
        opacity: .6;
        color: #fff;
        top:0;
        left:0;
        line-height: 100px;
        text-align: center;
    }
    .profile-avatar-container button{
        position:absolute;
        top:0;left:0;width:100px;height:100px;opacity: 0;
    }
</style>
<div class="row animated fadeInRight">
    <div class="col-md-4">
        <div class="box box-success">
            <div class="panel-heading">
                {:__('Account')}
            </div>
            <div class="panel-body">

                <form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.profile/update')}">
                    <input type="hidden" id="c-avatar" name="row[avatar]" value="{$admin.avatar}" />
                    <div class="box-body box-profile">

                        <div class="profile-avatar-container">
                            <img class="profile-user-img img-responsive img-circle plupload" src="__CDN__{$admin.avatar}" alt="">
                            <div class="profile-avatar-text img-circle">{:__('Click to edit')}</div>
                            <button id="plupload-avatar" class="plupload" data-input-id="c-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button>
                        </div>

                        <h3 class="profile-username text-center">{$admin.username}</h3>

                        <p class="text-muted text-center">{$admin.email}</p>
                        <div class="form-group">
                            <label for="username" class="control-label">{:__('Username')}:</label>
                            <input type="text" class="form-control" name="row[username]" value="{$admin.username}" disabled />
                        </div>
                        <div class="form-group">
                            <label for="email" class="control-label">{:__('Email')}:</label>
                            <input type="text" class="form-control" name="row[email]" value="{$admin.email}" data-rule="required;email" />
                        </div>
                        <div class="form-group">
                            <label for="nickname" class="control-label">{:__('Nickname')}:</label>
                            <input type="text" class="form-control" name="row[nickname]" value="{$admin.nickname}" data-rule="required" />
                        </div>
                        <div class="form-group">
                            <label for="password" class="control-label">{:__('Password')}:</label>
                            <input type="text" class="form-control" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" name="row[password]" value=""/>
                        </div>
                        <div class="form-group">
                            <button type="submit" class="btn btn-success">{:__('Submit')}</button>
                            <button type="reset" class="btn btn-default">{:__('Reset')}</button>
                        </div>

                    </div>
                </form>
            </div>
        </div>

    </div>
    <div class="col-md-8">
        <div class="panel panel-default panel-intro panel-nav">
            <div class="panel-heading">
                <ul class="nav nav-tabs">
                    {present name="row"}<li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> {:__('Shop info')}</a></li>{/present}
                    <li class="<?php if(!isset($row)) {echo 'active';} ?>"><a href="#two" data-toggle="tab"><i class="fa fa-list"></i> {:__('Admin log')}</a></li>
                </ul>
            </div>
            <div class="panel-body">
                <div id="myTabContent" class="tab-content">
                    {present name="row"}
                    <div class="tab-pane fade active in" id="one">
                        <div class="widget-body no-padding">
                            <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Abstract')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input id="c-abstract" data-rule="required" class="form-control" name="row[abstract]" type="text" value="{$row.abstract}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Logo_image')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input id="c-logo_image" data-rule="required" class="form-control" size="50" name="row[logo_image]" type="text" value="{$row.logo_image}">
                                            <div class="input-group-addon no-border no-padding">
                                                <span><button type="button" id="plupload-logo_image" class="btn btn-danger plupload" data-input-id="c-logo_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-logo_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                <span><button type="button" id="fachoose-logo_image" class="btn btn-primary fachoose" data-input-id="c-logo_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                            </div>
                                            <span class="msg-box n-right" for="c-logo_image"></span>
                                        </div>
                                        <ul class="row list-inline plupload-preview" id="p-logo_image"></ul>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Main_image')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="input-group">
                                            <input id="c-main_image" data-rule="required" class="form-control" size="50" name="row[main_image]" type="text" value="{$row.main_image}">
                                            <div class="input-group-addon no-border no-padding">
                                                <span><button type="button" id="plupload-main_image" class="btn btn-danger plupload" data-input-id="c-main_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-main_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                <span><button type="button" id="fachoose-main_image" class="btn btn-primary fachoose" data-input-id="c-main_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                            </div>
                                            <span class="msg-box n-right" for="c-main_image"></span>
                                        </div>
                                        <ul class="row list-inline plupload-preview" id="p-main_image"></ul>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <div class="radio">
                                            {foreach name="statusList" item="vo"}
                                            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
                                            {/foreach}
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-12 col-sm-2"></label>
                                    <div class="col-xs-12 col-sm-8">
                                        <button type="submit" class="btn btn-success">{:__('Submit')}</button>
                                        <button type="reset" class="btn btn-default">{:__('Reset')}</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    {/present}
                    <div class="tab-pane fade <?php if(!isset($row)) {echo 'active';} ?> in" id="two">
                        <div class="widget-body no-padding">
                            <div id="toolbar" class="toolbar">
                                {:build_toolbar('refresh')}
                            </div>
                            <table id="table" class="table table-striped table-bordered table-hover" width="100%">

                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
